package com.vx.ratingTool.bo;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.vx.ratingTool.Player;
import com.vx.ratingTool.bo.abstr.PlayerBO;
import com.vx.ratingTool.dao.PlayerDAOimpl;

public class PlayerBOimpl implements PlayerBO {

	private PlayerDAOimpl PlayerDAO;

	@Autowired
	public void setPlayerDAO(PlayerDAOimpl playerDAO) {
		PlayerDAO = playerDAO;
	}

	public PlayerBOimpl(PlayerDAOimpl playerDAO) {
		super();
		PlayerDAO = playerDAO;
	}

	public PlayerBOimpl() {
		super();
	}

	@Override
	public void save(Player player) {
		PlayerDAO.save(player);

	}

	@Override
	public void update(Player player) {
		PlayerDAO.update(player);

	}

	@Override
	public void delete(Player player) {
		PlayerDAO.delete(player);
	}

	@Override
	public Player findById(int id) {
		return PlayerDAO.findById(id);
	}

	@Override
	public void saveList(List<Player> players) {
		PlayerDAO.saveList(players);
	}

	@Override
	public List<Player> GetListOfPlayers() {
		return PlayerDAO.GetListOfPlayers();
	}

	@Override
	public void clearDatabase() {
		PlayerDAO.clearDatabase();

	}

	@Override
	public void massUpdate(List<Player> players) {
		PlayerDAO.massUpdate(players);

	}

	@Override
	public void setUpFactory() throws Exception {
		PlayerDAO.setUpFactory();

	}

	@Override
	public void tearDownFactory() throws Exception {
		PlayerDAO.tearDownFactory();

	}

}
